<template>
  <div class="word-card">
    <img :src="wordInfo.bgUrl" alt="背景图片" />
    <!-- <div class="word-card-title">
      {{ wordInfo.editor }}
    </div> -->
    <div class="word-card-text">
      <div class="word-card-info">模板编号:{{ wordInfo.tempNum }}</div>
      <div class="word-card-info">版本号:{{ wordInfo.tempVersion }}</div>
      <div class="word-card-info">编辑人:{{ wordInfo.editor }}</div>
      <div class="word-card-info">更新时间:{{ wordInfo.updataTime }}</div>
      <div class="word-card-info">已绑定业务流:{{ wordInfo.binding }}</div>
      <div class="word-card-btn">
        <el-button type="primary" size="mini" plain>版本列表</el-button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    wordInfo: {
      type: Object,
      default: function () {
        return {};
      },
    },
  },
  data() {
    return {
      // wordInfo: {
      //   tempNum: "MB12368",
      //   tempVersion: "v1.1",
      //   editor: "花蝴蝶",
      //   updataTime: "20201022",
      //   binding: 1,
      // },
    };
  },
};
</script>

<style lang="scss" scoped>
.word-card {
  position: relative;
  width: 100%;
  height: 100%;
  // width: 144px;
  // height: 183px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  box-sizing: border-box;
  cursor: pointer;
  overflow: hidden;
  img {
    width: 100%;
    height: 100%;
  }
  &-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: none;
    transition-duration: 1s;
  }
  .word-card-info {
    text-align: center;
    font-size: 14px;
    height: 25px;
    line-height: 25px;
    border-bottom: 1px solid #dadce0;
  }
  .word-card-btn {
    display: flex;
    width: 100%;
    justify-content: center;
    margin: 10px 0;
  }
  .word-card-title {
    position: absolute;
    width: 80px;
    height: 25px;
    top: 0;
    text-align: center;
    line-height: 25px;
    border: 1px solid #797979;
  }
}
.word-card:hover .word-card-text {
  display: block;
}
.word-card:hover {
  border: 1px solid #679fff;
}
</style>